-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding in General Database Executor and Code Exporting #374
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: 19thyneb <thyne.boonmark@gmail.com> Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com> Co-authored-by: NiStannum <52202164+NiStannum@users.noreply.github.com>
…org#336) Co-authored-by: Caitlyn Chen <caitlynachen@berkeley.edu> Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com>
* added notebook gallery * update README * removed scatterplot message in SQLExecutor * fixed typo in SQL documentation
The LuxTracer can be used to keep track of executed code. It is currently being used in the executors to track which lines of code were used to generate individual charts' data.
This executor uses SQL query templates from a specified query file. Rather than having hard coded queries written in the executor itself, this executor leaves the query writing to users. Currently works with Postgresql.
Added the _trace_code and _query parameters to Lux Vis objects. The _trace_code parameter will store the code used to execute the Vis data, and the _query parameter will store the SQL query used to first aggregate the data for the Vis in the SQLExecutor case.
Lux now only traces the code when a user calls the to_code() function of a Vis object. It does so by starting the tracer and re-executing the Vis object. Cleaned up handling of for loops in the tracing processor.
Vis objects' _source parameter is now set within the execution function.
Updated the compare_vis() function to use .equals to compare the source dataframes.
Fixed bug where found_variable could be an empty list and was not set to "df"
Added functionality with scatter and bar charts. The query template file for compatibility with MYSQL is also included
Updated to work with the MySQL case, need to change how the executor uses quotations around different Database queries. Updated the MySQL query template
Needed to update Executor files' code format to remove wrapped lines of code. Fixed code formatting for the Pandas executor visualizations.
Changed the line formatting to fit the Lux Tracing use case
Removed unnecessary commented lines
Added in variable names to the templates to make it clearer what the inputs need to be
When a SQL connection is made to the Lux config, now defaults to using the Postgres SQLExecutor rather than the GeneralDatabaseExecutor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Merging in code changes that add a more generalized Database Executor and code exporting to Lux.
Changes
The Generalized Database Executor works similarly to the SQLExecutor, but rather than having Postgres queries hard coded into the executor itself, these queries are read from a template file. The GeneralDatabaseExecutor then uses this template to access the queries it requires, allowing users to use queries for database systems other than Postgres. An example file for MySQL has been included with these code changes.